package com.virus.server.catalina;

import java.util.List;

public class Service {

    private Engine engine;

    private List<Connector> connectors;

    private String name;

    public Service(String name) {
        this.name = name;
    }

    public Engine getEngine() {
        return engine;
    }

    public void setConnectors(List<Connector> connectors) {
        this.connectors = connectors;
    }

    public String getName() {
        return name;
    }

    public void setEngine(Engine engine) {
        this.engine = engine;
    }

    public void init() {
        for (Connector connector : connectors) {
            new Thread(connector).start();
        }
    }
}
